﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutoUpdater.Util
{
    public class ProcessUtil
    {
        public static string StartExePath
        {
            get { return System.Windows.Forms.Application.ExecutablePath; }
        }

        public static string StartExeFileName
        {
            get
            {
                return Path.GetFileName(StartExePath);
            }
        }

        public static string StartProcessName
        {
            get
            {
                string fileName = StartExeFileName;
                return fileName.Substring(0, fileName.Length - 4);
            }
        }

        public static string BaseDirectory
        {
            get { return System.AppDomain.CurrentDomain.BaseDirectory; }
        }

        public static string TempPath
        {
            get {  return Path.Combine(BaseDirectory, "tempUpdate"); }
        }
    }
}
